#include <iostream.h>
void main()
    {
        float num1;
        float num2;
        char op;
        float ans;
        cout << "Podaj liczb: ";
        cin  >> num1;
        cout << "Podaj drug liczb: ";
        cin  >> num2;
        cout << "Wcinij A, aby doda dwie liczby."
             << endl
             << "Wcinij S, aby odj dwie liczby od siebie."
             << endl 
             << "Wcinij M, aby pomnoy dwie liczby."
             << endl
             << "Wcinij D, aby podzieli dwie liczby."
             << endl;
        cin >> op;
    if (op == 65)
    {
        ans = num1 + num2;
        cout << "Wynik wynosi " << ans << endl;
    }
    if (op == 83)
    {
        ans = num1 - num2;
        cout << "Wynik wynosi " << ans << endl;
    }
    if (op == 77)
    {
        ans = num1 * num2;
        cout << "Wynik wynosi " << ans << endl;
    }
    if (op == 68)
    {
        ans = num1 / num2;
        cout << "Wynik wynosi " << ans << endl;
    }
    if (op!=65 && op!=83 && op!=77 && op!=68)
    {
        cout << "Wybrano nieprawidow operacj!" << endl;
    }
}
